import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    {
        path: '/yasuo',
        component: () => import('../views/Home/YaSuoImage'),
        name: 'YaSuo'
    },
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('../views/Login')
    },
    {
        path: '/home',
        name: 'Home',
        component: () => import('../views/Home'),
        children: [
            {
                path: '/users',
                name: 'UserManagement',
                component: () => import('../views/UserManagement')
            },
            {
                path: '/welcome',
                name: 'Welcome',
                component: () => import('../views/Welcome')
            },
        ]


    }
]

const router = new VueRouter({
    routes
})

export default router
